name: CI
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  lint:
    name: lint
    runs-on: ubuntu-latest
    if: github.repository == 'openai/openai-node'

    steps:
      - uses: actions/checkout@v4

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: '18'

      - name: Install dependencies
        run: |
          yarn install

      - name: Check types
        run: |
          yarn build
